{% extends "base.html" %}
{% block title %}<title>项目列表-消防系统计算平台</title>{% endblock %}
{% block extrastyle %}
    {% load static %}
{% endblock %}

{% block header %}
    {% include "header.html" %}
{% endblock %}

{% block content %}
    <div class="content">
        <div class="jq22-demo center">
        <div class="row">
            <div class="col-lg-6">
                <div class="project-btn">
                    <button class="btn-primary" onclick="javascrtpt:window.location.href='{% url 'project_add' %}?pk='">
                        创建项目
                    </button>
                </div>
            </div>
            <form  class="col-lg-3" style="float:right" id="changelist-search" method="get" action="{% url 'project' %}">
                    <div class="input-group"><!-- DIV needed for valid HTML -->
                        <input  class="form-control" type="text" size="40" name="q" value="{% if q %}{{ q }}{% endif %}" id="searchbar" autofocus="">
                        <span class="input-group-btn">
                         <button type="submit" class="btn btn-primary">搜索</button>
                     </span>
                    </div>
                </form>

        </div>

            <div id="toolbar">

            </div>
            {% if project_list %}
                {% for var in project_list %}
                    <div class="project">
                    <!--<a style="color: #000;" href="{% url 'project_add' %}?pk={{ var.id }}">{{ var.project_name }}</a>
                    -->
                    <a style="color: #000;" href="{% url 'introduction' var.id %}">{{ var.project_name }}</a>
                    <div class="project-dtl">{{ var.project_text | slice:"80" }} </div>
                    <div class="project-dtl">{{ var.user.username }} {{ var.pub_date }}</div>
                    </div>
                {% endfor %}
            {% else %}

            {% endif %}

        </div>
    </div>
{% endblock %}
